<?php
/* -------------------------------------------------------------------------------------
* 	ID:						$Id: print_content.php 300 2013-09-23 10:46:44Z phone.mueller@googlemail.com $
* 	Letzter Stand:			$Revision: 300 $
* 	zuletzt geaendert von:	$Author: siekiera $
* 	Datum:					$Date: 2013-09-23 10:46:44 +0000 (Mon, 23 Sep 2013) $
*
* 	SEO:mercari by Siekiera Media
* 	http://www.seo-mercari.de
*
* 	Copyright (c) since 2011 SEO:mercari
* --------------------------------------------------------------------------------------
* 	based on:
* 	(c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
* 	(c) 2002-2003 osCommerce - www.oscommerce.com
* 	(c) 2003     nextcommerce - www.nextcommerce.org
* 	(c) 2005     xt:Commerce - www.xt-commerce.com
*
* 	Released under the GNU General Public License
* ----------------------------------------------------------------------------------- */

require ('includes/application_top.php');
$content_data = $db->db_query("SELECT content_heading, content_file, content_text FROM ".TABLE_CONTENT_MANAGER." WHERE content_group='".(int) $_GET['coID']."' and languages_id = '".$_SESSION['languages_id']."'");
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<title><?php echo $content_data->fields['content_heading']; ?></title>
<base href="<?php echo (getenv('HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>" />
<link rel="stylesheet" type="text/css" href="<?php echo 'templates/'.CURRENT_TEMPLATE.'/css/popup.css'; ?>" />
</head>
<body onload="window.print()">
<h2><?php echo $content_data->fields['content_heading']; ?></h2>
<?php
if ($content_data->fields['content_file'] != '') {
  ob_start();
	if (strpos($content_data->fields['content_file'], '.txt')) echo '<pre>';
	include (DIR_FS_CATALOG.'media/content/'.$content_data->fields['content_file']);
	if (strpos($content_data->fields['content_file'], '.txt')) echo '</pre>';
 	$content = utf8_encode(ob_get_contents());
 	ob_end_clean();
} else {
	$content = str_replace("\n","<br />",$content_data->fields['content_text']);
}
echo $content;

if(SITE_OVERLAYS == 'false') {
?>
<br /><br />
<a href="#" onclick="window.close();"><?php echo TEXT_CLOSE_WINDOW ?></a>
<?php } ?>
</body>
</html>